package com.aspose.cells;

import java.util.ArrayList;

class zbye extends zcdb {
   zbye(zbqs var1) {
      this.d = 189;
      this.c = new byte[6];
      byte var2 = 0;
      short var3;
      if (var1.j()) {
         var3 = (short)(var2 | 4);
      } else {
         var3 = (short)(var2 | 2);
      }

      if (var1.i()) {
         var3 = (short)(var3 | 8);
      }

      if (this.b(var1)) {
         var3 = (short)(var3 | 1);
      }

      if (var1.u()) {
         var3 = (short)(var3 | 16);
      }

      if (var1.n || this.a(var1)) {
         var3 = (short)(var3 | 32);
      }

      if (var1.f() && !var1.j()) {
         var3 = (short)(var3 | 64);
      }

      if (var1.g() && !var1.j()) {
         var3 = (short)(var3 | 128);
      }

      if (var1.p) {
         var3 = (short)(var3 | 512);
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a(var3), 0, this.c, 0, 2);
      if (var1.c != null) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var1.c.size()), 0, this.c, 2, 4);
      }

   }

   private boolean a(zbqs var1) {
      boolean var2 = false;
      boolean var3 = false;
      boolean var4 = false;
      boolean var5 = false;
      boolean var6 = false;
      if (var1 != null && var1.c != null) {
         if (0 == var1.c.size()) {
            return false;
         }

         ArrayList var7 = var1.c;
         zbmb var8 = null;

         for(int var9 = 0; var9 < var7.size(); ++var9) {
            var8 = (zbmb)var7.get(var9);
            if (var8.a instanceof DateTime) {
               var3 = true;
            } else if (var8.a instanceof Double) {
               var2 = true;
            } else if (var8.a instanceof Boolean) {
               var6 = true;
            } else if (zcee.a(var8.a)) {
               var5 = true;
            } else if (var8.a instanceof String) {
               var4 = true;
            }

            boolean var10 = var2 && (var4 || var6 || var5);
            boolean var11 = var3 && (var2 || var4 || var6 || var5);
            if (var10 || var11) {
               return true;
            }
         }
      }

      return false;
   }

   private boolean b(zbqs var1) {
      if (var1 != null && var1.c != null) {
         if (0 == var1.c.size()) {
            return true;
         }

         ArrayList var2 = var1.c;
         zbmb var3 = null;

         for(int var4 = 0; var4 < var2.size(); ++var4) {
            var3 = (zbmb)var2.get(var4);
            if (var3.a instanceof String || var3.a == null || var3.a instanceof Boolean) {
               return true;
            }

            if (zcee.a(var3.a)) {
               return true;
            }
         }
      }

      return false;
   }
}
